//
//  AlertStyle.swift
//  FrameProduct
//
//  Created by delegate on 2024/2/3.
//
import UIKit

typealias AlertStyle = UIAlertController.Style


func middle_dialog() {
    Alert.with(title: "标题", message: "message", style: .alert, type: .custom)
        .bind(button: "取消", style: .cancel, handler: nil)
        .bind(action: Alert.Action(title: "好的", handler: { action in
            
        }))
        .show()
}

func bottom_dialog_3() {
    Alert.with(style: .actionSheet, type: .system)
        .bind(button: "取消", style: .cancel, handler: nil)
        .bind(button: "拍照", handler: { action in
            
        })
        .bind(button: "相册上传", handler: { action in
            
        })
        .show()
}

func floating_() {
    Toast.with(message: "请阅读用户服务协议和隐私政策并勾选")
        .position(offset: CGPoint(x: 0, y: -50))
        .bind(action: Toast.Action(title: "确定"))
        .show()
    
    Alert.with(title: "标题", message: "我是内容啊啊啊啊", style: .alert)
        .bind(action: AlertAction(title: "取消", style: .cancel))
        .bind(button: "确定", isEnabled: false)
        .bind(textField: nil, placeholder: "请输入你的想法", isSecure: false)
        .show()
    
    createAlert(alertType: Toast.self, message: "请阅读用户服务协议和隐私政策并勾选", style: .info)
        .position(offset: CGPoint(x: 0, y: -50))
        .bind(action: Toast.Action(title: "确定"))
        .show()
}
